-
Notifications
You must be signed in to change notification settings - Fork 384
refactor: [M3-9647] - Reduce api requests made for every keystroke in Volume attach drawer #12052
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. Weβll occasionally send you account related emails.
Already on GitHub? Sign in to your account
refactor: [M3-9647] - Reduce api requests made for every keystroke in Volume attach drawer #12052
Conversation
β¦ Volume attach drawer
β¦647-reduce-api-calls-for-linode-volume
β¦me attach drawer
const { data: volume } = useVolumeQuery( | ||
values.volume_id, | ||
values.volume_id !== -1 | ||
); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Enabled the useVolumeQuery
only when Volume_id
is set and not -1(default value)
packages/manager/src/features/Volumes/Drawers/VolumeDrawer/VolumeSelect.tsx
Outdated
Show resolved
Hide resolved
packages/manager/src/features/Volumes/Drawers/VolumeDrawer/VolumeSelect.tsx
Show resolved
Hide resolved
β¦647-reduce-api-calls-for-linode-volume
PR looks good now! Do we still need to add debouncing? |
Added debouncing! cc: @bnussman-akamai |
Cloud Manager UI test resultsπΊ 3 failing tests on test run #8 βοΈ
Details
TroubleshootingUse this command to re-run the failing tests: pnpm cy:run -s "cypress/e2e/core/placementGroups/placement-groups-linode-assignment.spec.ts,cypress/e2e/core/stackscripts/smoke-community-stackscripts.spec.ts,cypress/e2e/core/objectStorageMulticluster/bucket-create-multicluster.spec.ts" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good, e2e failures are unrelated
Description π
CM fires an API request for every keystroke in Volume attach drawer.
Changes π
Target release date ποΈ
N/A
Preview π·
Screen.Recording.2025-04-17.at.5.02.43.PM.mov
Screen.Recording.2025-04-17.at.5.07.32.PM.mov
How to test π§ͺ
Reproduction steps
/volumes
request fired on each key storeVerification steps
/volumes
request is only fired on the initial render of the drawerAuthor Checklists
As an Author, to speed up the review process, I considered π€
π Doing a self review
β Our contribution guidelines
π€ Splitting feature into small PRs
β Adding a changeset
π§ͺ Providing/improving test coverage
π Removing all sensitive information from the code and PR description
π© Using a feature flag to protect the release
π£ Providing comprehensive reproduction steps
π Providing or updating our documentation
π Scheduling a pair reviewing session
π± Providing mobile support
βΏ Providing accessibility support
As an Author, before moving this PR from Draft to Open, I confirmed β